/*
               File: NoticiaGeneral
        Description: Noticia General
             Author: GeneXus C# Generator version 10_2_1-58381
       Generated on: 8/28/2012 20:59:20.65
       Program type: Callable routine
          Main DBMS: sqlserver
*/
using System;
using System.Collections;
using GeneXus.Utils;
using GeneXus.Resources;
using GeneXus.Application;
using GeneXus.Metadata;
using System.Data;
using System.Data.SqlClient;
using GeneXus.Data;
using com.genexus;
using GeneXus.Data.ADO;
using GeneXus.Data.NTier;
using GeneXus.Data.NTier.ADO;
using System.Runtime.Remoting;
using GeneXus.WebControls;
using GeneXus.Http;
using GeneXus.XML;
using GeneXus.Search;
using GeneXus.Encryption;
using GeneXus.Http.Client;
using GeneXus.Http.Server;
using System.Xml.Serialization;
using System.Data.SqlTypes;
using System.ServiceModel;
using System.Runtime.Serialization;
namespace GeneXus.Programs {
   public class noticiageneral : GXWebComponent, System.Web.SessionState.IRequiresSessionState
   {
      public noticiageneral( )
      {
         context = new GxContext(  );
         DataStoreUtil.LoadDataStores( context);
         dsDefault = context.GetDataStore("Default") ;
         IsMain = true;
         context.SetDefaultTheme("GeneXusXEv2");
      }

      public noticiageneral( IGxContext context )
      {
         this.context = context;
         IsMain = false;
         dsDefault = context.GetDataStore("Default") ;
      }

      public void release( )
      {
      }

      public void execute( short aP0_NoticiaId )
      {
         this.A34NoticiaId = aP0_NoticiaId;
         executePrivate();
      }

      void executePrivate( )
      {
         isStatic = false;
         webExecute();
      }

      public override void SetPrefix( String sPPrefix )
      {
         sPrefix = sPPrefix;
      }

      protected override void createObjects( )
      {
      }

      protected void INITWEB( )
      {
         initialize_properties( ) ;
         if ( StringUtil.Len( (String)(sPrefix)) == 0 )
         {
            if ( nGotPars == 0 )
            {
               entryPointCalled = false ;
               gxfirstwebparm = GetNextPar( ) ;
               gxfirstwebparm_bkp = gxfirstwebparm ;
               gxfirstwebparm = DecryptAjaxCall( gxfirstwebparm) ;
               if ( StringUtil.StrCmp(gxfirstwebparm, "dyncall") == 0 )
               {
                  setAjaxCallMode();
                  if ( ! IsValidAjaxCall( true) )
                  {
                     GxWebError = 1 ;
                     return  ;
                  }
                  dyncall( GetNextPar( )) ;
                  return  ;
               }
               else if ( StringUtil.StrCmp(gxfirstwebparm, "dyncomponent") == 0 )
               {
                  setAjaxEventMode();
                  if ( ! IsValidAjaxCall( true) )
                  {
                     GxWebError = 1 ;
                     return  ;
                  }
                  nDynComponent = 1 ;
                  sCompPrefix = GetNextPar( ) ;
                  sSFPrefix = GetNextPar( ) ;
                  A34NoticiaId = (short)(NumberUtil.Val( GetNextPar( ), ".")) ;
                  context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A34NoticiaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A34NoticiaId), 4, 0)));
                  setjustcreated();
                  componentprepare(new Object[] {(String)sCompPrefix,(String)sSFPrefix,(short)A34NoticiaId});
                  componentstart();
                  context.httpAjaxContext.ajax_rspStartCmp(sPrefix);
                  componentdraw();
                  context.httpAjaxContext.ajax_rspEndCmp();
                  return  ;
               }
               else if ( StringUtil.StrCmp(gxfirstwebparm, "gxajaxEvt") == 0 )
               {
                  setAjaxEventMode();
                  if ( ! IsValidAjaxCall( true) )
                  {
                     GxWebError = 1 ;
                     return  ;
                  }
                  gxfirstwebparm = GetNextPar( ) ;
               }
               else
               {
                  if ( ! IsValidAjaxCall( false) )
                  {
                     GxWebError = 1 ;
                     return  ;
                  }
                  gxfirstwebparm = gxfirstwebparm_bkp ;
               }
            }
         }
         context.SetDefaultTheme("GeneXusXEv2");
      }

      public override void webExecute( )
      {
         if ( initialized == 0 )
         {
            createObjects();
            initialize();
         }
         INITWEB( ) ;
         if ( ! isAjaxCallMode( ) )
         {
            PA0M2( ) ;
            if ( ( GxWebError == 0 ) && ! isAjaxCallMode( ) )
            {
               /* GeneXus formulas. */
               AV14Pgmname = "NoticiaGeneral" ;
               context.Gx_err = 0 ;
               WS0M2( ) ;
               if ( ! isAjaxCallMode( ) )
               {
                  if ( nDynComponent == 0 )
                  {
                     throw new System.Net.WebException("WebComponent is not allowed to run") ;
                  }
               }
            }
            if ( context.isAjaxRequest( ) )
            {
               enableOutput();
               if ( ! context.isAjaxRequest( ) )
               {
                  context.GX_webresponse.AppendHeader("Cache-Control", "max-age=0");
               }
               if ( String.IsNullOrEmpty(StringUtil.RTrim( context.wjLoc)) )
               {
                  context.GX_webresponse.AddString((String)(context.getJSONResponse( )));
               }
               else
               {
                  if ( context.isAjaxRequest( ) )
                  {
                     disableOutput();
                  }
                  RenderHtmlHeaders( ) ;
                  context.Redirect( context.wjLoc );
                  context.DispatchAjaxCommands();
               }
            }
         }
         this.cleanup();
      }

      protected void RenderHtmlHeaders( )
      {
         GxWebStd.gx_html_headers( context, 0, "", "", Form.Meta, Form.Metaequiv, "IE=EmulateIE7");
      }

      protected void RenderHtmlOpenForm( )
      {
         if ( StringUtil.Len( sPrefix) == 0 )
         {
            context.WriteHtmlText( "<title>") ;
            context.WriteHtmlText( "Noticia General") ;
            context.WriteHtmlTextNl( "</title>") ;
            if ( StringUtil.Len( sDynURL) > 0 )
            {
               context.WriteHtmlText( "<BASE href=\""+sDynURL+"\" />") ;
            }
            define_styles( ) ;
         }
         if ( ! context.isSmartDevice( ) )
         {
            context.AddJavascriptSource("gxgral.js", "?"+context.GetBuildNumber( 58381));
            context.AddJavascriptSource("gxcfg.js", "?"+context.GetBuildNumber( 58381));
         }
         else
         {
            context.AddJavascriptSource("gxapiSD.js", "?"+context.GetBuildNumber( 58381));
            context.AddJavascriptSource("gxfxSD.js", "?"+context.GetBuildNumber( 58381));
            context.AddJavascriptSource("gxtypesSD.js", "?"+context.GetBuildNumber( 58381));
            context.AddJavascriptSource("gxpopupSD.js", "?"+context.GetBuildNumber( 58381));
            context.AddJavascriptSource("gxfrmutlSD.js", "?"+context.GetBuildNumber( 58381));
            context.AddJavascriptSource("gxgridSD.js", "?"+context.GetBuildNumber( 58381));
            context.AddJavascriptSource("JavaScripTableSD.js", "?"+context.GetBuildNumber( 58381));
            context.AddJavascriptSource("rijndaelSD.js", "?"+context.GetBuildNumber( 58381));
            context.AddJavascriptSource("gxgralSD.js", "?"+context.GetBuildNumber( 58381));
         }
         context.AddJavascriptSource("calendar.js", "?"+context.GetBuildNumber( 58381));
         context.AddJavascriptSource("calendar-setup.js", "?"+context.GetBuildNumber( 58381));
         context.AddJavascriptSource("calendar-es.js", "?"+context.GetBuildNumber( 58381));
         if ( StringUtil.Len( sPrefix) == 0 )
         {
            context.CloseHtmlHeader();
            FormProcess = " onkeyup=\"gx.evt.onkeyup(event)\" onkeypress=\"gx.evt.onkeypress(event,false,false)\" onkeydown=\"gx.evt.onkeypress(null,false,false)\"" ;
            context.WriteHtmlText( "<body") ;
            context.WriteHtmlText( " "+"class=\"Form\""+" "+" style=\"-moz-opacity:0;opacity:0;") ;
            context.WriteHtmlText( "\""+FormProcess+">") ;
            context.skipLines(1);
            context.WriteHtmlTextNl( "<form id=\"MAINFORM\" onsubmit=\"try{return gx.csv.validForm()}catch(e){return true;}\" name=\"MAINFORM\" method=\"post\" class=\"Form\" novalidate action=\""+formatLink("noticiageneral.aspx") + "?" + UrlEncode("" +A34NoticiaId)+"\">") ;
            GxWebStd.gx_hidden_field( context, "_EventName", "");
            GxWebStd.gx_hidden_field( context, "_EventGridId", "");
            GxWebStd.gx_hidden_field( context, "_EventRowId", "");
         }
      }

      protected void RenderHtmlCloseForm0M2( )
      {
         /* Send hidden variables. */
         /* Send saved values. */
         GxWebStd.gx_hidden_field( context, sPrefix+"wcpOA34NoticiaId", StringUtil.LTrim( StringUtil.NToC( (decimal)(wcpOA34NoticiaId), 4, 0, ",", "")));
         if ( ( StringUtil.Len( sPrefix) != 0 ) && context.isAjaxRequest( ) )
         {
            context.AddJavascriptSource("noticiageneral.js", "?201282820592071");
         }
         GxWebStd.gx_hidden_field( context, sPrefix+"GX_FocusControl", GX_FocusControl);
         define_styles( ) ;
         if ( StringUtil.Len( sPrefix) == 0 )
         {
            SendAjaxEncryptionKey();
            SendComponentObjects();
            SendServerCommands();
            SendState();
            context.WriteHtmlTextNl( "</form>") ;
            include_jscripts( ) ;
            context.WriteHtmlTextNl( "</body>") ;
            context.WriteHtmlTextNl( "</html>") ;
         }
      }

      protected void WB0M0( )
      {
         if ( context.isAjaxRequest( ) )
         {
            disableOutput();
         }
         if ( ! wbLoad )
         {
            if ( StringUtil.Len( sPrefix) == 0 )
            {
               RenderHtmlHeaders( ) ;
            }
            RenderHtmlOpenForm( ) ;
            if ( StringUtil.Len( sPrefix) != 0 )
            {
               GxWebStd.gx_hidden_field( context, sPrefix+"_CMPPGM", "noticiageneral.aspx");
            }
            GxWebStd.gx_msg_list( context, "", context.GX_msglist.DisplayMode, "", "", sPrefix, "false");
            wb_table1_2_0M2( true) ;
         }
         else
         {
            wb_table1_2_0M2( false) ;
         }
         return  ;
      }

      protected void wb_table1_2_0M2e( bool wbgen )
      {
         if ( wbgen )
         {
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 48,'" + sPrefix + "',false,'',0)\"" ;
            ClassString = "ActionButtons" ;
            StyleString = "" ;
            GxWebStd.gx_button_ctrl( context, bttBtnupdate_Internalname, "", "Modifica", bttBtnupdate_Jsonclick, 5, "Modifica", "", StyleString, ClassString, 1, 1, "standard", sPrefix+"E\\'DOUPDATE\\'.", TempTags, "", context.GetButtonType( ), "HLP_NoticiaGeneral.htm");
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 49,'" + sPrefix + "',false,'',0)\"" ;
            ClassString = "ActionButtons" ;
            StyleString = "" ;
            GxWebStd.gx_button_ctrl( context, bttBtndelete_Internalname, "", "Eliminar", bttBtndelete_Jsonclick, 5, "Eliminar", "", StyleString, ClassString, 1, 1, "standard", sPrefix+"E\\'DODELETE\\'.", TempTags, "", context.GetButtonType( ), "HLP_NoticiaGeneral.htm");
         }
         wbLoad = true ;
      }

      protected void START0M2( )
      {
         wbLoad = false ;
         wbEnd = 0 ;
         wbStart = 0 ;
         if ( StringUtil.Len( sPrefix) == 0 )
         {
            Form.Meta.addItem("Generator", "GeneXus C# 10_2_1-58381", 0) ;
            Form.Meta.addItem("Description", "Noticia General", 0) ;
            context.wjLoc = "" ;
            context.nUserReturn = 0 ;
            context.wbHandled = 0 ;
            if ( StringUtil.Len( sPrefix) == 0 )
            {
               sXEvt = cgiGet( "_EventName") ;
               if ( ! GetJustCreated( ) && ( StringUtil.StrCmp(context.GetRequestMethod( ), "POST") == 0 ) )
               {
               }
            }
         }
         wbErr = false ;
         if ( ( StringUtil.Len( sPrefix) == 0 ) || ( nDraw == 1 ) )
         {
            if ( nDoneStart == 0 )
            {
               STRUP0M0( ) ;
            }
         }
      }

      protected void WS0M2( )
      {
         START0M2( ) ;
         EVT0M2( ) ;
      }

      protected void EVT0M2( )
      {
         sXEvt = cgiGet( "_EventName") ;
         if ( ( ( ( StringUtil.Len( sPrefix) == 0 ) ) || ( StringUtil.StringSearch( sXEvt, sPrefix, 1) > 0 ) ) && ! GetJustCreated( ) && ( StringUtil.StrCmp(context.GetRequestMethod( ), "POST") == 0 ) )
         {
            if ( String.IsNullOrEmpty(StringUtil.RTrim( context.wjLoc)) && ( context.nUserReturn != 1 ) && ! wbErr )
            {
               /* Read Web Panel buttons. */
               if ( context.wbHandled == 0 )
               {
                  if ( StringUtil.Len( sPrefix) == 0 )
                  {
                     sEvt = cgiGet( "_EventName") ;
                     EvtGridId = cgiGet( "_EventGridId") ;
                     EvtRowId = cgiGet( "_EventRowId") ;
                  }
                  if ( StringUtil.Len( sEvt) > 0 )
                  {
                     sEvtType = StringUtil.Left( sEvt, 1) ;
                     sEvt = StringUtil.Right( sEvt, (short)(StringUtil.Len( sEvt)-1)) ;
                     if ( StringUtil.StrCmp(sEvtType, "E") == 0 )
                     {
                        sEvtType = StringUtil.Right( sEvt, 1) ;
                        if ( StringUtil.StrCmp(sEvtType, ".") == 0 )
                        {
                           sEvt = StringUtil.Left( sEvt, (short)(StringUtil.Len( sEvt)-1)) ;
                           if ( StringUtil.StrCmp(sEvt, "RFR") == 0 )
                           {
                              if ( ( StringUtil.Len( sPrefix) != 0 ) && ( nDoneStart == 0 ) )
                              {
                                 STRUP0M0( ) ;
                              }
                              if ( String.IsNullOrEmpty(StringUtil.RTrim( context.wjLoc)) && ( context.nUserReturn != 1 ) )
                              {
                                 context.wbHandled = 1 ;
                                 if ( ! wbErr )
                                 {
                                    dynload_actions( ) ;
                                 }
                              }
                           }
                           else if ( StringUtil.StrCmp(sEvt, "START") == 0 )
                           {
                              if ( ( StringUtil.Len( sPrefix) != 0 ) && ( nDoneStart == 0 ) )
                              {
                                 STRUP0M0( ) ;
                              }
                              if ( String.IsNullOrEmpty(StringUtil.RTrim( context.wjLoc)) && ( context.nUserReturn != 1 ) )
                              {
                                 context.wbHandled = 1 ;
                                 if ( ! wbErr )
                                 {
                                    dynload_actions( ) ;
                                    /* Execute user event: E110M2 */
                                    E110M2 ();
                                 }
                              }
                           }
                           else if ( StringUtil.StrCmp(sEvt, "LOAD") == 0 )
                           {
                              if ( ( StringUtil.Len( sPrefix) != 0 ) && ( nDoneStart == 0 ) )
                              {
                                 STRUP0M0( ) ;
                              }
                              if ( String.IsNullOrEmpty(StringUtil.RTrim( context.wjLoc)) && ( context.nUserReturn != 1 ) )
                              {
                                 context.wbHandled = 1 ;
                                 if ( ! wbErr )
                                 {
                                    dynload_actions( ) ;
                                    /* Execute user event: E120M2 */
                                    E120M2 ();
                                 }
                              }
                           }
                           else if ( StringUtil.StrCmp(sEvt, "'DOUPDATE'") == 0 )
                           {
                              if ( ( StringUtil.Len( sPrefix) != 0 ) && ( nDoneStart == 0 ) )
                              {
                                 STRUP0M0( ) ;
                              }
                              if ( String.IsNullOrEmpty(StringUtil.RTrim( context.wjLoc)) && ( context.nUserReturn != 1 ) )
                              {
                                 context.wbHandled = 1 ;
                                 if ( ! wbErr )
                                 {
                                    dynload_actions( ) ;
                                    /* Execute user event: E130M2 */
                                    E130M2 ();
                                 }
                              }
                           }
                           else if ( StringUtil.StrCmp(sEvt, "'DODELETE'") == 0 )
                           {
                              if ( ( StringUtil.Len( sPrefix) != 0 ) && ( nDoneStart == 0 ) )
                              {
                                 STRUP0M0( ) ;
                              }
                              if ( String.IsNullOrEmpty(StringUtil.RTrim( context.wjLoc)) && ( context.nUserReturn != 1 ) )
                              {
                                 context.wbHandled = 1 ;
                                 if ( ! wbErr )
                                 {
                                    dynload_actions( ) ;
                                    /* Execute user event: E140M2 */
                                    E140M2 ();
                                 }
                              }
                           }
                           else if ( StringUtil.StrCmp(sEvt, "ENTER") == 0 )
                           {
                              if ( ( StringUtil.Len( sPrefix) != 0 ) && ( nDoneStart == 0 ) )
                              {
                                 STRUP0M0( ) ;
                              }
                              if ( String.IsNullOrEmpty(StringUtil.RTrim( context.wjLoc)) && ( context.nUserReturn != 1 ) )
                              {
                                 context.wbHandled = 1 ;
                                 if ( ! wbErr )
                                 {
                                    if ( ! wbErr )
                                    {
                                       Rfr0gs = false ;
                                       if ( ! Rfr0gs )
                                       {
                                       }
                                       dynload_actions( ) ;
                                    }
                                 }
                              }
                              /* No code required for Cancel button. It is implemented as the Reset button. */
                           }
                           else if ( StringUtil.StrCmp(sEvt, "LSCR") == 0 )
                           {
                              if ( ( StringUtil.Len( sPrefix) != 0 ) && ( nDoneStart == 0 ) )
                              {
                                 STRUP0M0( ) ;
                              }
                              if ( String.IsNullOrEmpty(StringUtil.RTrim( context.wjLoc)) && ( context.nUserReturn != 1 ) )
                              {
                                 context.wbHandled = 1 ;
                                 if ( ! wbErr )
                                 {
                                    dynload_actions( ) ;
                                 }
                              }
                           }
                        }
                        else
                        {
                        }
                     }
                     context.wbHandled = 1 ;
                  }
               }
            }
         }
      }

      protected void WE0M2( )
      {
         if ( ! GxWebStd.gx_redirect( context) )
         {
            Rfr0gs = true ;
            Refresh( ) ;
            if ( ! GxWebStd.gx_redirect( context) )
            {
               RenderHtmlCloseForm0M2( ) ;
            }
         }
      }

      protected void PA0M2( )
      {
         if ( nDonePA == 0 )
         {
            if ( StringUtil.Len( sPrefix) != 0 )
            {
               initialize_properties( ) ;
            }
            nDonePA = 1 ;
         }
      }

      protected void dynload_actions( )
      {
         /* End function dynload_actions */
      }

      protected void Refresh( )
      {
         RF0M2( ) ;
         /* End function Refresh */
      }

      protected void RF0M2( )
      {
         if ( String.IsNullOrEmpty(StringUtil.RTrim( context.wjLoc)) && ( context.nUserReturn != 1 ) )
         {
            /* Using cursor H000M2 */
            pr_default.execute(0, new Object[] {A34NoticiaId});
            while ( (pr_default.getStatus(0) != 101) )
            {
               A33PeriodistaRespNom = H000M2_A33PeriodistaRespNom[0] ;
               context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A33PeriodistaRespNom", A33PeriodistaRespNom);
               n33PeriodistaRespNom = H000M2_n33PeriodistaRespNom[0] ;
               A32PeriodistaRespId = H000M2_A32PeriodistaRespId[0] ;
               context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A32PeriodistaRespId", StringUtil.LTrim( StringUtil.Str( (decimal)(A32PeriodistaRespId), 4, 0)));
               A29AgenciaId = H000M2_A29AgenciaId[0] ;
               context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A29AgenciaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A29AgenciaId), 4, 0)));
               A12TipoNoticiaDetalle = H000M2_A12TipoNoticiaDetalle[0] ;
               context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A12TipoNoticiaDetalle", A12TipoNoticiaDetalle);
               A10TipoNoticiaId = H000M2_A10TipoNoticiaId[0] ;
               context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A10TipoNoticiaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A10TipoNoticiaId), 4, 0)));
               A36NoticiaDescripcion = H000M2_A36NoticiaDescripcion[0] ;
               context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A36NoticiaDescripcion", A36NoticiaDescripcion);
               A35NoticiaFecha = H000M2_A35NoticiaFecha[0] ;
               context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A35NoticiaFecha", context.localUtil.Format(A35NoticiaFecha, "99/99/99"));
               A37NoticiaPicture = H000M2_A37NoticiaPicture[0] ;
               context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A37NoticiaPicture", A37NoticiaPicture);
               A33PeriodistaRespNom = H000M2_A33PeriodistaRespNom[0] ;
               context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A33PeriodistaRespNom", A33PeriodistaRespNom);
               n33PeriodistaRespNom = H000M2_n33PeriodistaRespNom[0] ;
               A12TipoNoticiaDetalle = H000M2_A12TipoNoticiaDetalle[0] ;
               context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A12TipoNoticiaDetalle", A12TipoNoticiaDetalle);
               /* Execute user event: E120M2 */
               E120M2 ();
               /* Exiting from a For First loop. */
               if (true) break;
            }
            pr_default.close(0);
            WB0M0( ) ;
         }
      }

      protected void STRUP0M0( )
      {
         /* Before Start, stand alone formulas. */
         AV14Pgmname = "NoticiaGeneral" ;
         context.Gx_err = 0 ;
         /* Execute Start event if defined. */
         context.wbGlbDoneStart = 0 ;
         /* Execute user event: E110M2 */
         E110M2 ();
         context.wbGlbDoneStart = 1 ;
         nDoneStart = 1 ;
         /* After Start, stand alone formulas. */
         sXEvt = cgiGet( "_EventName") ;
         if ( ! GetJustCreated( ) && ( StringUtil.StrCmp(context.GetRequestMethod( ), "POST") == 0 ) )
         {
            /* Read saved SDTs. */
            /* Read variables values. */
            A35NoticiaFecha = context.localUtil.CToD( cgiGet( edtNoticiaFecha_Internalname), 2) ;
            context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A35NoticiaFecha", context.localUtil.Format(A35NoticiaFecha, "99/99/99"));
            A36NoticiaDescripcion = cgiGet( edtNoticiaDescripcion_Internalname) ;
            context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A36NoticiaDescripcion", A36NoticiaDescripcion);
            A37NoticiaPicture = cgiGet( edtNoticiaPicture_Internalname) ;
            context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A37NoticiaPicture", A37NoticiaPicture);
            A10TipoNoticiaId = (short)(context.localUtil.CToN( cgiGet( edtTipoNoticiaId_Internalname), ",", ".")) ;
            context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A10TipoNoticiaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A10TipoNoticiaId), 4, 0)));
            A12TipoNoticiaDetalle = cgiGet( edtTipoNoticiaDetalle_Internalname) ;
            context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A12TipoNoticiaDetalle", A12TipoNoticiaDetalle);
            A29AgenciaId = (short)(context.localUtil.CToN( cgiGet( edtAgenciaId_Internalname), ",", ".")) ;
            context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A29AgenciaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A29AgenciaId), 4, 0)));
            A32PeriodistaRespId = (short)(context.localUtil.CToN( cgiGet( edtPeriodistaRespId_Internalname), ",", ".")) ;
            context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A32PeriodistaRespId", StringUtil.LTrim( StringUtil.Str( (decimal)(A32PeriodistaRespId), 4, 0)));
            A33PeriodistaRespNom = cgiGet( edtPeriodistaRespNom_Internalname) ;
            n33PeriodistaRespNom = false ;
            context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A33PeriodistaRespNom", A33PeriodistaRespNom);
            /* Read saved values. */
            wcpOA34NoticiaId = (short)(context.localUtil.CToN( cgiGet( sPrefix+"wcpOA34NoticiaId"), ",", ".")) ;
            /* Read subfile selected row values. */
            /* Read hidden variables. */
         }
         else
         {
            dynload_actions( ) ;
         }
      }

      protected void GXStart( )
      {
         /* Execute user event: E110M2 */
         E110M2 ();
         if ( returnInSub )
         {
            returnInSub = true;
            if (true) return;
         }
      }

      protected void E110M2( )
      {
         /* Start Routine */
         new isauthorized(context ).execute(  AV14Pgmname, out  AV5IsAuthorized) ;
         if ( ! AV5IsAuthorized )
         {
            context.wjLoc = formatLink("notauthorized.aspx") + "?" + UrlEncode(StringUtil.RTrim(AV14Pgmname)) ;
         }
         /* Execute user subroutine: S112 */
         S112 ();
         if ( returnInSub )
         {
            returnInSub = true;
            if (true) return;
         }
      }

      protected void nextLoad( )
      {
      }

      protected void E120M2( )
      {
         /* Load Routine */
         edtTipoNoticiaDetalle_Link = formatLink("viewtiponoticia.aspx") + "?" + UrlEncode("" +A10TipoNoticiaId) + "," + UrlEncode(StringUtil.RTrim("")) ;
         context.httpAjaxContext.ajax_rsp_assign_prop(sPrefix, false, edtTipoNoticiaDetalle_Internalname, "Link", edtTipoNoticiaDetalle_Link);
      }

      protected void E130M2( )
      {
         /* 'DoUpdate' Routine */
         context.wjLoc = formatLink("noticia.aspx") + "?" + UrlEncode(StringUtil.RTrim("UPD")) + "," + UrlEncode("" +A34NoticiaId) ;
      }

      protected void E140M2( )
      {
         /* 'DoDelete' Routine */
         context.wjLoc = formatLink("noticia.aspx") + "?" + UrlEncode(StringUtil.RTrim("DLT")) + "," + UrlEncode("" +A34NoticiaId) ;
      }

      protected void S112( )
      {
         /* 'PREPARETRANSACTION' Routine */
         AV8TrnContext = new SdtTransactionContext(context) ;
         AV8TrnContext.gxTpr_Callerobject = AV14Pgmname ;
         context.httpAjaxContext.ajax_rsp_assign_sdt_attri(sPrefix, false, "AV8TrnContext", (Object)(AV8TrnContext));
         AV8TrnContext.gxTpr_Callerondelete = false ;
         context.httpAjaxContext.ajax_rsp_assign_sdt_attri(sPrefix, false, "AV8TrnContext", (Object)(AV8TrnContext));
         AV8TrnContext.gxTpr_Callerurl = AV11HTTPRequest.ScriptName+"?"+AV11HTTPRequest.QueryString ;
         context.httpAjaxContext.ajax_rsp_assign_sdt_attri(sPrefix, false, "AV8TrnContext", (Object)(AV8TrnContext));
         AV8TrnContext.gxTpr_Transactionname = "Noticia" ;
         context.httpAjaxContext.ajax_rsp_assign_sdt_attri(sPrefix, false, "AV8TrnContext", (Object)(AV8TrnContext));
         AV9TrnContextAtt = new SdtTransactionContext_Attribute(context) ;
         AV9TrnContextAtt.gxTpr_Attributename = "NoticiaId" ;
         context.httpAjaxContext.ajax_rsp_assign_sdt_attri(sPrefix, false, "AV9TrnContextAtt", (Object)(AV9TrnContextAtt));
         AV9TrnContextAtt.gxTpr_Attributevalue = StringUtil.Str( (decimal)(AV7NoticiaId), 4, 0) ;
         context.httpAjaxContext.ajax_rsp_assign_sdt_attri(sPrefix, false, "AV9TrnContextAtt", (Object)(AV9TrnContextAtt));
         AV8TrnContext.gxTpr_Attributes.Add(AV9TrnContextAtt, 0) ;
         AV10Session.Set("TrnContext", AV8TrnContext.ToXml(false, "TransactionContext", "Obligatorio"));
      }

      protected void wb_table1_2_0M2( bool wbgen )
      {
         if ( wbgen )
         {
            /* Table start */
            sStyleString = "" ;
            GxWebStd.gx_table_start( context, tblTbl2_Internalname, tblTbl2_Internalname, "", "Table", 0, "", "", 1, 2, sStyleString, "", 0);
            context.WriteHtmlText( "<tbody>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblocknoticiaid_Internalname, "Id", "", "", lblTextblocknoticiaid_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_NoticiaGeneral.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            ClassString = "ReadonlyAttribute" ;
            StyleString = "" ;
            GxWebStd.gx_single_line_edit( context, edtNoticiaId_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(A34NoticiaId), 4, 0, ",", "")), context.localUtil.Format( (decimal)(A34NoticiaId), "ZZZ9"), "", "", "", "", "", "", edtNoticiaId_Jsonclick, 0, ClassString, StyleString, "", 1, 0, 0, "text", "", 4, "chr", 1, "row", 4, 0, 0, 0, 1, 1, true, "Id", "right", "HLP_NoticiaGeneral.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblocknoticiafecha_Internalname, "Fecha", "", "", lblTextblocknoticiafecha_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_NoticiaGeneral.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            ClassString = "ReadonlyAttribute" ;
            StyleString = "" ;
            context.WriteHtmlText( "<div id=\""+edtNoticiaFecha_Internalname+"_dp_container\" class=\"dp_container\" style=\"white-space:nowrap;display:inline;\">") ;
            GxWebStd.gx_single_line_edit( context, edtNoticiaFecha_Internalname, context.localUtil.Format(A35NoticiaFecha, "99/99/99"), context.localUtil.Format( A35NoticiaFecha, "99/99/99"), "", "", "", "", "", "", edtNoticiaFecha_Jsonclick, 0, ClassString, StyleString, "", 1, 0, 0, "text", "", 8, "chr", 1, "row", 8, 0, 0, 0, 1, 1, true, "", "right", "HLP_NoticiaGeneral.htm");
            GxWebStd.gx_bitmap( context, edtNoticiaFecha_Internalname+"_dp_trigger", context.GetImagePath( "61b9b5d3-dff6-4d59-9b00-da61bc2cbe93", "", context.GetTheme( )), "", "", "", "", ((1==0)||(0==0) ? 0 : 1), 0, "Date selector", "Date selector", 0, 1, 0, "", 0, "", 0, 0, 0, "", "", "cursor: pointer;vertical-align:text-bottom", "", "", "", "", "", "", 1, false, false, "HLP_NoticiaGeneral.htm");
            context.WriteHtmlTextNl( "</div>") ;
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblocknoticiadescripcion_Internalname, "Descripcion", "", "", lblTextblocknoticiadescripcion_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_NoticiaGeneral.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            ClassString = "ReadonlyAttribute" ;
            StyleString = "" ;
            GxWebStd.gx_single_line_edit( context, edtNoticiaDescripcion_Internalname, StringUtil.RTrim( A36NoticiaDescripcion), StringUtil.RTrim( context.localUtil.Format( A36NoticiaDescripcion, "")), "", "", "", "", "", "", edtNoticiaDescripcion_Jsonclick, 0, ClassString, StyleString, "", 1, 0, 0, "text", "", 40, "chr", 1, "row", 40, 0, 0, 0, 1, 1, true, "", "left", "HLP_NoticiaGeneral.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblocknoticiapicture_Internalname, "Picture", "", "", lblTextblocknoticiapicture_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_NoticiaGeneral.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            ClassString = "ReadonlyAttribute" ;
            StyleString = "" ;
            edtNoticiaPicture_Filetype = "tmp" ;
            context.httpAjaxContext.ajax_rsp_assign_prop(sPrefix, false, edtNoticiaPicture_Internalname, "Filetype", edtNoticiaPicture_Filetype);
            if ( ! String.IsNullOrEmpty(StringUtil.RTrim( A37NoticiaPicture)) )
            {
               gxblobfileaux.Source = A37NoticiaPicture ;
               if ( ! gxblobfileaux.HasExtension() || ( StringUtil.StrCmp(edtNoticiaPicture_Filetype, "tmp") != 0 ) )
               {
                  gxblobfileaux.SetExtension(StringUtil.Trim( edtNoticiaPicture_Filetype));
               }
               if ( gxblobfileaux.ErrCode == 0 )
               {
                  A37NoticiaPicture = gxblobfileaux.GetAbsoluteName() ;
                  context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A37NoticiaPicture", A37NoticiaPicture);
               }
            }
            GxWebStd.gx_blob_field( context, edtNoticiaPicture_Internalname, StringUtil.RTrim( A37NoticiaPicture), context.PathToRelativeUrl( A37NoticiaPicture), (String.IsNullOrEmpty(StringUtil.RTrim( edtNoticiaPicture_Contenttype)) ? context.GetContentType( (String.IsNullOrEmpty(StringUtil.RTrim( edtNoticiaPicture_Filetype)) ? A37NoticiaPicture : edtNoticiaPicture_Filetype)) : edtNoticiaPicture_Contenttype), false, "", edtNoticiaPicture_Parameters, 0, 0, 1, "", "", 0, -1, 250, "px", 60, "px", 0, 0, 0, edtNoticiaPicture_Jsonclick, "", StyleString, ClassString, ""+"", "", "", "HLP_NoticiaGeneral.htm");
            context.httpAjaxContext.ajax_rsp_assign_prop(sPrefix, false, edtNoticiaPicture_Internalname, "URL", context.PathToRelativeUrl( A37NoticiaPicture));
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblocktiponoticiaid_Internalname, "Tipo Noticia Id", "", "", lblTextblocktiponoticiaid_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_NoticiaGeneral.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            ClassString = "ReadonlyAttribute" ;
            StyleString = "" ;
            GxWebStd.gx_single_line_edit( context, edtTipoNoticiaId_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(A10TipoNoticiaId), 4, 0, ",", "")), context.localUtil.Format( (decimal)(A10TipoNoticiaId), "ZZZ9"), "", "", "", "", "", "", edtTipoNoticiaId_Jsonclick, 0, ClassString, StyleString, "", 1, 0, 0, "text", "", 4, "chr", 1, "row", 4, 0, 0, 0, 1, 1, true, "Id", "right", "HLP_NoticiaGeneral.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblocktiponoticiadetalle_Internalname, "Tipo Noticia Detalle", "", "", lblTextblocktiponoticiadetalle_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_NoticiaGeneral.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            ClassString = "ReadonlyAttribute" ;
            StyleString = "" ;
            GxWebStd.gx_single_line_edit( context, edtTipoNoticiaDetalle_Internalname, StringUtil.RTrim( A12TipoNoticiaDetalle), StringUtil.RTrim( context.localUtil.Format( A12TipoNoticiaDetalle, "")), "", "", edtTipoNoticiaDetalle_Link, "", "", "", edtTipoNoticiaDetalle_Jsonclick, 0, ClassString, StyleString, "", 1, 0, 0, "text", "", 40, "chr", 1, "row", 40, 0, 0, 0, 1, 1, true, "", "left", "HLP_NoticiaGeneral.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblockagenciaid_Internalname, "Agencia Id", "", "", lblTextblockagenciaid_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_NoticiaGeneral.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            ClassString = "ReadonlyAttribute" ;
            StyleString = "" ;
            GxWebStd.gx_single_line_edit( context, edtAgenciaId_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(A29AgenciaId), 4, 0, ",", "")), context.localUtil.Format( (decimal)(A29AgenciaId), "ZZZ9"), "", "", "", "", "", "", edtAgenciaId_Jsonclick, 0, ClassString, StyleString, "", 1, 0, 0, "text", "", 4, "chr", 1, "row", 4, 0, 0, 0, 1, 1, true, "Id", "right", "HLP_NoticiaGeneral.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblockperiodistarespid_Internalname, "Resp Id", "", "", lblTextblockperiodistarespid_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_NoticiaGeneral.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            ClassString = "ReadonlyAttribute" ;
            StyleString = "" ;
            GxWebStd.gx_single_line_edit( context, edtPeriodistaRespId_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(A32PeriodistaRespId), 4, 0, ",", "")), context.localUtil.Format( (decimal)(A32PeriodistaRespId), "ZZZ9"), "", "", "", "", "", "", edtPeriodistaRespId_Jsonclick, 0, ClassString, StyleString, "", 1, 0, 0, "text", "", 4, "chr", 1, "row", 4, 0, 0, 0, 1, 1, true, "Id", "right", "HLP_NoticiaGeneral.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            /* Text block */
            ClassString = "TextBlock" ;
            StyleString = "" ;
            GxWebStd.gx_label_ctrl( context, lblTextblockperiodistarespnom_Internalname, "Resp Nom", "", "", lblTextblockperiodistarespnom_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_NoticiaGeneral.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            ClassString = "ReadonlyAttribute" ;
            StyleString = "" ;
            GxWebStd.gx_single_line_edit( context, edtPeriodistaRespNom_Internalname, StringUtil.RTrim( A33PeriodistaRespNom), StringUtil.RTrim( context.localUtil.Format( A33PeriodistaRespNom, "")), "", "", "", "", "", "", edtPeriodistaRespNom_Jsonclick, 0, ClassString, StyleString, "", 1, 0, 0, "text", "", 40, "chr", 1, "row", 40, 0, 0, 0, 1, 1, true, "", "left", "HLP_NoticiaGeneral.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "</tbody>") ;
            /* End of table */
            context.WriteHtmlText( "</table>") ;
            wb_table1_2_0M2e( true) ;
         }
         else
         {
            wb_table1_2_0M2e( false) ;
         }
      }

      public override void setparameters( Object[] obj )
      {
         createObjects();
         initialize();
         A34NoticiaId = Convert.ToInt16(getParm(obj,0)) ;
         context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A34NoticiaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A34NoticiaId), 4, 0)));
      }

      public override String getresponse( String sGXDynURL )
      {
         initialize_properties( ) ;
         BackMsgLst = context.GX_msglist ;
         context.GX_msglist = LclMsgLst ;
         sDynURL = sGXDynURL ;
         nGotPars = (short)(1) ;
         nGXWrapped = (short)(1) ;
         context.SetWrapped(true);
         PA0M2( ) ;
         WS0M2( ) ;
         WE0M2( ) ;
         this.cleanup();
         context.SetWrapped(false);
         SaveComponentMsgList(sPrefix);
         context.GX_msglist = BackMsgLst ;
         return "";
      }

      public void responsestatic( String sGXDynURL )
      {
      }

      public override void componentbind( Object[] obj )
      {
         if ( IsUrlCreated( ) )
         {
            return  ;
         }
         sCtrlA34NoticiaId = (String)((String)getParm(obj,0)) ;
      }

      public override void componentrestorestate( String sPPrefix ,
                                                  String sPSFPrefix )
      {
         sPrefix = sPPrefix + sPSFPrefix ;
         PA0M2( ) ;
         WCParametersGet( ) ;
      }

      public override void componentprepare( Object[] obj )
      {
         wbLoad = false ;
         sCompPrefix = (String)getParm(obj,0) ;
         sSFPrefix = (String)getParm(obj,1) ;
         sPrefix = sCompPrefix + sSFPrefix ;
         AddComponentObject(sPrefix, "noticiageneral");
         if ( ( nDoneStart == 0 ) && ( nDynComponent == 0 ) )
         {
            INITWEB( ) ;
         }
         else
         {
            init_default_properties( ) ;
         }
         PA0M2( ) ;
         if ( ! GetJustCreated( ) && ( StringUtil.StrCmp(context.GetRequestMethod( ), "POST") == 0 ) && ( context.wbGlbDoneStart == 0 ) )
         {
            WCParametersGet( ) ;
         }
         else
         {
            A34NoticiaId = Convert.ToInt16(getParm(obj,2)) ;
            context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A34NoticiaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A34NoticiaId), 4, 0)));
         }
         wcpOA34NoticiaId = (short)(context.localUtil.CToN( cgiGet( sPrefix+"wcpOA34NoticiaId"), ",", ".")) ;
         if ( ! GetJustCreated( ) && ( ( A34NoticiaId != wcpOA34NoticiaId ) ) )
         {
            setjustcreated();
         }
         wcpOA34NoticiaId = A34NoticiaId ;
      }

      protected void WCParametersGet( )
      {
         /* Read Component Parameters. */
         sCtrlA34NoticiaId = cgiGet( sPrefix+"A34NoticiaId_CTRL") ;
         if ( StringUtil.Len( sCtrlA34NoticiaId) > 0 )
         {
            A34NoticiaId = (short)(context.localUtil.CToN( cgiGet( sCtrlA34NoticiaId), ",", ".")) ;
            context.httpAjaxContext.ajax_rsp_assign_attri(sPrefix, false, "A34NoticiaId", StringUtil.LTrim( StringUtil.Str( (decimal)(A34NoticiaId), 4, 0)));
         }
         else
         {
            A34NoticiaId = (short)(context.localUtil.CToN( cgiGet( sPrefix+"A34NoticiaId_PARM"), ",", ".")) ;
         }
      }

      public override void componentprocess( String sPPrefix ,
                                             String sPSFPrefix ,
                                             String sCompEvt )
      {
         sCompPrefix = sPPrefix ;
         sSFPrefix = sPSFPrefix ;
         sPrefix = sCompPrefix + sSFPrefix ;
         BackMsgLst = context.GX_msglist ;
         context.GX_msglist = LclMsgLst ;
         INITWEB( ) ;
         nDraw = 0 ;
         PA0M2( ) ;
         sEvt = sCompEvt ;
         WCParametersGet( ) ;
         WS0M2( ) ;
         SaveComponentMsgList(sPrefix);
         context.GX_msglist = BackMsgLst ;
      }

      public override void componentstart( )
      {
         if ( nDoneStart == 0 )
         {
            WCStart( ) ;
         }
      }

      protected void WCStart( )
      {
         nDraw = 1 ;
         BackMsgLst = context.GX_msglist ;
         context.GX_msglist = LclMsgLst ;
         WS0M2( ) ;
         SaveComponentMsgList(sPrefix);
         context.GX_msglist = BackMsgLst ;
      }

      protected void WCParametersSet( )
      {
         GxWebStd.gx_hidden_field( context, sPrefix+"A34NoticiaId_PARM", StringUtil.LTrim( StringUtil.NToC( (decimal)(A34NoticiaId), 4, 0, ",", "")));
         if ( StringUtil.Len( StringUtil.RTrim( sCtrlA34NoticiaId)) > 0 )
         {
            GxWebStd.gx_hidden_field( context, sPrefix+"A34NoticiaId_CTRL", StringUtil.RTrim( sCtrlA34NoticiaId));
         }
      }

      public override void componentdraw( )
      {
         if ( nDoneStart == 0 )
         {
            WCStart( ) ;
         }
         BackMsgLst = context.GX_msglist ;
         context.GX_msglist = LclMsgLst ;
         WCParametersSet( ) ;
         WE0M2( ) ;
         this.cleanup();
         SaveComponentMsgList(sPrefix);
         context.GX_msglist = BackMsgLst ;
      }

      public override String getstring( String sGXControl )
      {
         String sCtrlName ;
         if ( StringUtil.StrCmp(StringUtil.Substring( sGXControl, 1, 1), "&") == 0 )
         {
            sCtrlName = StringUtil.Substring( sGXControl, 2, StringUtil.Len( sGXControl)-1) ;
         }
         else
         {
            sCtrlName = sGXControl ;
         }
         return cgiGet( sPrefix+"v"+StringUtil.Upper( sCtrlName)) ;
      }

      public override void componentjscripts( )
      {
         include_jscripts( ) ;
      }

      public override void componentthemes( )
      {
         define_styles( ) ;
      }

      protected void define_styles( )
      {
         AddStyleSheetFile("calendar-system.css", "?21265620");
         AddThemeStyleSheetFile("", context.GetTheme( )+".css", "?20412474");
         idxLst = 1 ;
         while ( idxLst <= Form.Jscriptsrc.Count )
         {
            context.AddJavascriptSource(StringUtil.RTrim( Form.Jscriptsrc.Item(idxLst)), "?201282820592114");
            idxLst = (int)(idxLst+1) ;
         }
         /* End function define_styles */
      }

      protected void include_jscripts( )
      {
         context.AddJavascriptSource("noticiageneral.js", "?201282820592114");
         /* End function include_jscripts */
      }

      protected void init_default_properties( )
      {
         lblTextblocknoticiaid_Internalname = sPrefix+"TEXTBLOCKNOTICIAID" ;
         edtNoticiaId_Internalname = sPrefix+"NOTICIAID" ;
         lblTextblocknoticiafecha_Internalname = sPrefix+"TEXTBLOCKNOTICIAFECHA" ;
         edtNoticiaFecha_Internalname = sPrefix+"NOTICIAFECHA" ;
         lblTextblocknoticiadescripcion_Internalname = sPrefix+"TEXTBLOCKNOTICIADESCRIPCION" ;
         edtNoticiaDescripcion_Internalname = sPrefix+"NOTICIADESCRIPCION" ;
         lblTextblocknoticiapicture_Internalname = sPrefix+"TEXTBLOCKNOTICIAPICTURE" ;
         edtNoticiaPicture_Internalname = sPrefix+"NOTICIAPICTURE" ;
         lblTextblocktiponoticiaid_Internalname = sPrefix+"TEXTBLOCKTIPONOTICIAID" ;
         edtTipoNoticiaId_Internalname = sPrefix+"TIPONOTICIAID" ;
         lblTextblocktiponoticiadetalle_Internalname = sPrefix+"TEXTBLOCKTIPONOTICIADETALLE" ;
         edtTipoNoticiaDetalle_Internalname = sPrefix+"TIPONOTICIADETALLE" ;
         lblTextblockagenciaid_Internalname = sPrefix+"TEXTBLOCKAGENCIAID" ;
         edtAgenciaId_Internalname = sPrefix+"AGENCIAID" ;
         lblTextblockperiodistarespid_Internalname = sPrefix+"TEXTBLOCKPERIODISTARESPID" ;
         edtPeriodistaRespId_Internalname = sPrefix+"PERIODISTARESPID" ;
         lblTextblockperiodistarespnom_Internalname = sPrefix+"TEXTBLOCKPERIODISTARESPNOM" ;
         edtPeriodistaRespNom_Internalname = sPrefix+"PERIODISTARESPNOM" ;
         tblTbl2_Internalname = sPrefix+"TBL2" ;
         bttBtnupdate_Internalname = sPrefix+"BTNUPDATE" ;
         bttBtndelete_Internalname = sPrefix+"BTNDELETE" ;
         Form.Internalname = sPrefix+"FORM" ;
      }

      protected void initialize_properties( )
      {
         init_default_properties( ) ;
         edtPeriodistaRespNom_Jsonclick = "" ;
         edtPeriodistaRespId_Jsonclick = "" ;
         edtAgenciaId_Jsonclick = "" ;
         edtTipoNoticiaDetalle_Jsonclick = "" ;
         edtTipoNoticiaId_Jsonclick = "" ;
         edtNoticiaPicture_Jsonclick = "" ;
         edtNoticiaPicture_Parameters = "" ;
         edtNoticiaPicture_Contenttype = "" ;
         edtNoticiaPicture_Filetype = "" ;
         edtNoticiaDescripcion_Jsonclick = "" ;
         edtNoticiaFecha_Jsonclick = "" ;
         edtNoticiaId_Jsonclick = "" ;
         edtTipoNoticiaDetalle_Link = "" ;
      }

      public void cleanup( )
      {
         flushBuffer();
         CloseOpenCursors();
         if ( IsMain )
         {
            context.CloseConnections() ;
         }
      }

      protected void CloseOpenCursors( )
      {
      }

      public override void initialize( )
      {
         gxfirstwebparm = "" ;
         gxfirstwebparm_bkp = "" ;
         sPrefix = "" ;
         AV14Pgmname = "" ;
         sDynURL = "" ;
         FormProcess = "" ;
         GX_FocusControl = "" ;
         TempTags = "" ;
         ClassString = "" ;
         StyleString = "" ;
         bttBtnupdate_Jsonclick = "" ;
         bttBtndelete_Jsonclick = "" ;
         Form = new GXWebForm();
         sXEvt = "" ;
         sEvt = "" ;
         EvtGridId = "" ;
         EvtRowId = "" ;
         sEvtType = "" ;
         scmdbuf = "" ;
         H000M2_A34NoticiaId = new short[1] ;
         H000M2_A33PeriodistaRespNom = new String[] {""} ;
         H000M2_n33PeriodistaRespNom = new bool[] {false} ;
         H000M2_A32PeriodistaRespId = new short[1] ;
         H000M2_A29AgenciaId = new short[1] ;
         H000M2_A12TipoNoticiaDetalle = new String[] {""} ;
         H000M2_A10TipoNoticiaId = new short[1] ;
         H000M2_A36NoticiaDescripcion = new String[] {""} ;
         H000M2_A35NoticiaFecha = new DateTime[] {DateTime.MinValue} ;
         H000M2_A37NoticiaPicture = new String[] {""} ;
         A33PeriodistaRespNom = "" ;
         A12TipoNoticiaDetalle = "" ;
         A36NoticiaDescripcion = "" ;
         A35NoticiaFecha = DateTime.MinValue ;
         A37NoticiaPicture = "" ;
         AV8TrnContext = new SdtTransactionContext(context);
         AV11HTTPRequest = new GxHttpRequest( context);
         AV9TrnContextAtt = new SdtTransactionContext_Attribute(context);
         AV10Session = new GxWebSession( context);
         sStyleString = "" ;
         lblTextblocknoticiaid_Jsonclick = "" ;
         lblTextblocknoticiafecha_Jsonclick = "" ;
         lblTextblocknoticiadescripcion_Jsonclick = "" ;
         lblTextblocknoticiapicture_Jsonclick = "" ;
         gxblobfileaux = new GxFile(context.GetPhysicalPath());
         lblTextblocktiponoticiaid_Jsonclick = "" ;
         lblTextblocktiponoticiadetalle_Jsonclick = "" ;
         lblTextblockagenciaid_Jsonclick = "" ;
         lblTextblockperiodistarespid_Jsonclick = "" ;
         lblTextblockperiodistarespnom_Jsonclick = "" ;
         BackMsgLst = new msglist();
         LclMsgLst = new msglist();
         sCtrlA34NoticiaId = "" ;
         pr_default = new DataStoreProvider(context, new GeneXus.Programs.noticiageneral__default(),
            new Object[][] {
                new Object[] {
               H000M2_A34NoticiaId, H000M2_A33PeriodistaRespNom, H000M2_n33PeriodistaRespNom, H000M2_A32PeriodistaRespId, H000M2_A29AgenciaId, H000M2_A12TipoNoticiaDetalle, H000M2_A10TipoNoticiaId, H000M2_A36NoticiaDescripcion, H000M2_A35NoticiaFecha, H000M2_A37NoticiaPicture
               }
            }
         );
         AV14Pgmname = "NoticiaGeneral" ;
         /* GeneXus formulas. */
         AV14Pgmname = "NoticiaGeneral" ;
         context.Gx_err = 0 ;
      }

      private short A34NoticiaId ;
      private short wcpOA34NoticiaId ;
      private short nGotPars ;
      private short GxWebError ;
      private short nDynComponent ;
      private short initialized ;
      private short wbEnd ;
      private short wbStart ;
      private short nDraw ;
      private short nDoneStart ;
      private short nDonePA ;
      private short A32PeriodistaRespId ;
      private short A29AgenciaId ;
      private short A10TipoNoticiaId ;
      private short AV7NoticiaId ;
      private short nGXWrapped ;
      private int idxLst ;
      private String gxfirstwebparm ;
      private String gxfirstwebparm_bkp ;
      private String sPrefix ;
      private String sCompPrefix ;
      private String sSFPrefix ;
      private String AV14Pgmname ;
      private String sDynURL ;
      private String FormProcess ;
      private String GX_FocusControl ;
      private String TempTags ;
      private String ClassString ;
      private String StyleString ;
      private String bttBtnupdate_Internalname ;
      private String bttBtnupdate_Jsonclick ;
      private String bttBtndelete_Internalname ;
      private String bttBtndelete_Jsonclick ;
      private String sXEvt ;
      private String sEvt ;
      private String EvtGridId ;
      private String EvtRowId ;
      private String sEvtType ;
      private String scmdbuf ;
      private String edtNoticiaFecha_Internalname ;
      private String edtNoticiaDescripcion_Internalname ;
      private String edtNoticiaPicture_Internalname ;
      private String edtTipoNoticiaId_Internalname ;
      private String edtTipoNoticiaDetalle_Internalname ;
      private String edtAgenciaId_Internalname ;
      private String edtPeriodistaRespId_Internalname ;
      private String edtPeriodistaRespNom_Internalname ;
      private String edtTipoNoticiaDetalle_Link ;
      private String sStyleString ;
      private String tblTbl2_Internalname ;
      private String lblTextblocknoticiaid_Internalname ;
      private String lblTextblocknoticiaid_Jsonclick ;
      private String edtNoticiaId_Internalname ;
      private String edtNoticiaId_Jsonclick ;
      private String lblTextblocknoticiafecha_Internalname ;
      private String lblTextblocknoticiafecha_Jsonclick ;
      private String edtNoticiaFecha_Jsonclick ;
      private String lblTextblocknoticiadescripcion_Internalname ;
      private String lblTextblocknoticiadescripcion_Jsonclick ;
      private String edtNoticiaDescripcion_Jsonclick ;
      private String lblTextblocknoticiapicture_Internalname ;
      private String lblTextblocknoticiapicture_Jsonclick ;
      private String edtNoticiaPicture_Filetype ;
      private String edtNoticiaPicture_Contenttype ;
      private String edtNoticiaPicture_Parameters ;
      private String edtNoticiaPicture_Jsonclick ;
      private String lblTextblocktiponoticiaid_Internalname ;
      private String lblTextblocktiponoticiaid_Jsonclick ;
      private String edtTipoNoticiaId_Jsonclick ;
      private String lblTextblocktiponoticiadetalle_Internalname ;
      private String lblTextblocktiponoticiadetalle_Jsonclick ;
      private String edtTipoNoticiaDetalle_Jsonclick ;
      private String lblTextblockagenciaid_Internalname ;
      private String lblTextblockagenciaid_Jsonclick ;
      private String edtAgenciaId_Jsonclick ;
      private String lblTextblockperiodistarespid_Internalname ;
      private String lblTextblockperiodistarespid_Jsonclick ;
      private String edtPeriodistaRespId_Jsonclick ;
      private String lblTextblockperiodistarespnom_Internalname ;
      private String lblTextblockperiodistarespnom_Jsonclick ;
      private String edtPeriodistaRespNom_Jsonclick ;
      private String sCtrlA34NoticiaId ;
      private DateTime A35NoticiaFecha ;
      private bool entryPointCalled ;
      private bool wbLoad ;
      private bool Rfr0gs ;
      private bool wbErr ;
      private bool n33PeriodistaRespNom ;
      private bool returnInSub ;
      private bool AV5IsAuthorized ;
      private String A33PeriodistaRespNom ;
      private String A12TipoNoticiaDetalle ;
      private String A36NoticiaDescripcion ;
      private String A37NoticiaPicture ;
      private GxFile gxblobfileaux ;
      private GXWebForm Form ;
      private IGxDataStore dsDefault ;
      private IDataStoreProvider pr_default ;
      private short[] H000M2_A34NoticiaId ;
      private String[] H000M2_A33PeriodistaRespNom ;
      private bool[] H000M2_n33PeriodistaRespNom ;
      private short[] H000M2_A32PeriodistaRespId ;
      private short[] H000M2_A29AgenciaId ;
      private String[] H000M2_A12TipoNoticiaDetalle ;
      private short[] H000M2_A10TipoNoticiaId ;
      private String[] H000M2_A36NoticiaDescripcion ;
      private DateTime[] H000M2_A35NoticiaFecha ;
      private String[] H000M2_A37NoticiaPicture ;
      private msglist BackMsgLst ;
      private msglist LclMsgLst ;
      private GxHttpRequest AV11HTTPRequest ;
      private GxWebSession AV10Session ;
      private SdtTransactionContext AV8TrnContext ;
      private SdtTransactionContext_Attribute AV9TrnContextAtt ;
   }

   public class noticiageneral__default : DataStoreHelperBase, IDataStoreHelper
   {
      public ICursor[] getCursors( )
      {
         cursorDefinitions();
         return new Cursor[] {
          new ForEachCursor(def[0])
       };
    }

    private static CursorDef[] def;
    private void cursorDefinitions( )
    {
       if ( def == null )
       {
          Object[] prmH000M2 ;
          prmH000M2 = new Object[] {
          new Object[] {"@NoticiaId",SqlDbType.SmallInt,4,0}
          } ;
          def= new CursorDef[] {
              new CursorDef("H000M2", "SELECT T1.[NoticiaId], T2.[PeriodistaNombre] AS PeriodistaRespNom, T1.[PeriodistaRespId] AS PeriodistaRespId, T1.[AgenciaId], T3.[TipoNoticiaDetalle], T1.[TipoNoticiaId], T1.[NoticiaDescripcion], T1.[NoticiaFecha], T1.[NoticiaPicture] FROM (([Noticia] T1 WITH (NOLOCK) INNER JOIN [Periodista] T2 WITH (NOLOCK) ON T2.[PeriodistaId] = T1.[PeriodistaRespId]) INNER JOIN [TipoNoticia] T3 WITH (NOLOCK) ON T3.[TipoNoticiaId] = T1.[TipoNoticiaId]) WHERE T1.[NoticiaId] = @NoticiaId ORDER BY T1.[NoticiaId] ",false, GxErrorMask.GX_NOMASK | GxErrorMask.GX_MASKLOOPLOCK, false, this,prmH000M2,1,0,true,true )
          };
       }
    }

    public void getResults( int cursor ,
                            IFieldGetter rslt ,
                            Object[] buf )
    {
       switch ( cursor )
       {
             case 0 :
                ((short[]) buf[0])[0] = rslt.getShort(1) ;
                ((String[]) buf[1])[0] = rslt.getVarchar(2) ;
                ((bool[]) buf[2])[0] = rslt.wasNull(2);
                ((short[]) buf[3])[0] = rslt.getShort(3) ;
                ((short[]) buf[4])[0] = rslt.getShort(4) ;
                ((String[]) buf[5])[0] = rslt.getVarchar(5) ;
                ((short[]) buf[6])[0] = rslt.getShort(6) ;
                ((String[]) buf[7])[0] = rslt.getVarchar(7) ;
                ((DateTime[]) buf[8])[0] = rslt.getGXDate(8) ;
                ((String[]) buf[9])[0] = rslt.getBLOBFile(9, "tmp", "") ;
                break;
       }
    }

    public void setParameters( int cursor ,
                               IFieldSetter stmt ,
                               Object[] parms )
    {
       switch ( cursor )
       {
             case 0 :
                stmt.SetParameter(1, (short)parms[0]);
                break;
       }
    }

 }

}
